import { useEffect, useState } from 'react'
import Router from './routes'
import { useLocation } from 'react-router-dom';
import cs from 'classnames'


function App() {
  const [showNav, setShowNav] = useState(false)
  const needNav = ['/', '/message', '/info', '/recommand', '/user']
  const { pathname } = useLocation()

  useEffect(() => {
    setShowNav(needNav.includes(pathname))
    // console.log(showNav);
  }, [pathname])

  return (
      <div style={{
        position: 'relative',
        overflow: 'hidden'
      }}>
        <Router />
      </ div>

  )
}

export default App
